#include<bits/stdc++.h>

using namespace std;
typedef long long ll;
//C(i,0)=C(i,i)=1 C(i,j)=C(i-1,j)+C(i-1,j-1)
const int maxn = 30;
ll dp[maxn][maxn];//dp[i][j]=C(i,j)


int main() {
    //C(i,0)=C(i,i)=1
    for (int i = 0; i < maxn; i++)dp[i][0] = dp[i][i] = 1;
    for (int i = 2; i < maxn; i++) {
        for (int j = 1; j < i; j++) {
            //C(i,j)=C(i-1,j)+C(i-1,j-1)
            dp[i][j] = dp[i - 1][j] + dp[i - 1][j - 1];
        }
    }

    int n, m;
    while (cin >> n >> m) {
        cout << dp[n][m] << endl;
    }

}
